package com.nanhai.buddhist.college.module.collegebase.api.department;

import com.nanhai.buddhist.college.framework.common.pojo.CommonResult;
import com.nanhai.buddhist.college.module.collegebase.api.department.dto.DepartmentDTO;
import com.nanhai.buddhist.college.module.collegebase.enums.ApiConstants;
import feign.Param;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;

/**
 * @author AKai
 * @date 2022/8/23
 */
@Api(tags = "RPC 服务 - 系部数据提供")
@FeignClient(name = ApiConstants.NAME)
public interface DepartmentApi {
    String PREFIX = ApiConstants.PREFIX + "/departments";

    @GetMapping(PREFIX + "/info")
    CommonResult<DepartmentDTO> getDepartmentDTOById(@RequestParam("departmentsId") String departmentsId);


    @GetMapping(PREFIX + "/List")
    CommonResult<List<DepartmentDTO>> getDepartmentDTOByIds(@RequestParam("ids") Collection<String> ids);

    @GetMapping(PREFIX + "/byClassesId/info")
    CommonResult<DepartmentDTO> getDepartmentDTOByClassesId(@RequestParam("classesId") String classesId);

    @GetMapping(PREFIX + "/byClassesId/List")
    CommonResult<List<DepartmentDTO>> getDepartmentDTOByClassesIds(@RequestParam("ids") Collection<String> ids);


}
